from django.utils.timezone import now
import random
# from datetime import datetime

STRING_LIB = '1234567890'


def generate_timestamp_string(prefix=""):
    """A method to generate timestamp up to  microseconds-level."""
    random_string = "".join(random.sample(STRING_LIB, 6))
    timestamp_string = now().strftime("%Y%m%d%H%M%S%f")
    return "%s%s%s" % (prefix, timestamp_string, random_string)